diff --git a/swh/web/ui/templates/api-endpoints.html b/swh/web/ui/templates/api-endpoints.html index ee254388f..f81fd2cef 100644 --- a/swh/web/ui/templates/api-endpoints.html +++ b/swh/web/ui/templates/api-endpoints.html @@ -1,69 +1,69 @@ {% extends "layout.html" %} -{% block title %} Software Heritage API – Endpoints {% endblock %} +{% block title %} Endpoints – Software Heritage API {% endblock %} {% block content %}

Below you can find a list of the available endpoints for version 1 of the Software Heritage API. For a more general introduction please refer to the API overview.

Endpoints marked "available" are considered stable for the current version of the API; endpoints marked "upcoming" are work in progress that will be stabilized in the near feature.

{% for route, doc in doc_routes %} {% if 'tags' in doc and doc['tags'] is not none %} {% else %} {% endif %} {% set doc_intro = doc['docstring'].split('\n\n')[0] %} {% endfor %}
Endpoint Status Description
{{ route }} {{ ', '.join(doc['tags']) }}{{ route }} available{{ doc_intro | safe_docstring_display | safe }}
{% endblock %} diff --git a/swh/web/ui/templates/api.html b/swh/web/ui/templates/api.html index aea670365..40c1de741 100644 --- a/swh/web/ui/templates/api.html +++ b/swh/web/ui/templates/api.html @@ -1,8 +1,8 @@ {% extends "layout.html" %} -{% block title %} Software Heritage API – Overview {% endblock %} +{% block title %} Overview – Software Heritage API {% endblock %} {% block content %}
{% include 'includes/apidoc-header.html' %}
{% endblock %} diff --git a/swh/web/ui/templates/apidoc.html b/swh/web/ui/templates/apidoc.html index 4a3de9861..549c15a9e 100644 --- a/swh/web/ui/templates/apidoc.html +++ b/swh/web/ui/templates/apidoc.html @@ -1,124 +1,124 @@ {% extends "layout.html" %} -{% block title %} Software Heritage API – {{ route }} {% endblock %} +{% block title %}{{ route }} – Software Heritage API {% endblock %} {% block content %} {% if docstring %}

Description

{{ docstring | safe_docstring_display | safe }}
{% endif %} {% if response_data and response_data is not none %}

Request

{{ request.method }} {{ request.url }}

Response

{% if headers_data and headers_data is not none %}

Headers

{% for header_name, header_value in headers_data.items() %}
{{ header_name }} {{ header_value | urlize_header_links | safe }}
{% endfor %} {% endif %}

Body

{{ response_data | urlize_api_links | safe }}
{% endif %}
{% for url in urls %} {% endfor %}
URL Allowed Methods
{{ url['rule'] }} {{ url['methods'] | sort | join(', ') }}

{% if args and args|length > 0 %}

Args

{% for arg in args %}
{{ arg['name'] }}: {{ arg['type'] }}
{{ arg['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if params and params|length > 0 %}

Params

{% for param in params %}
{{ param['name'] }}: {{ param['type'] }}
{{ param['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if excs and excs|length > 0 %}

Raises

{% for exc in excs %}
{{ exc['exc'] }}
{{ exc['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if headers %}

Headers

{% for header in headers %}
{{ header['name'] }}: string
{{ header['doc'] | safe_docstring_display | safe }}
{% endfor %}
{% endif %} {% if return %}

Returns

{{ return['type'] }}
{{ return['doc'] | safe_docstring_display | safe }}
{% endif %} {% if examples %}

Examples

{% for example in examples %}
{{ example }}
{% endfor %}
{% endif %} {% endblock %}